package top.cwk.dubbo.web.controller.hello;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import top.cwk.dubbo.api.hello.IHelloService;

@Controller
public class HelloController {

	@Autowired
	private IHelloService helloService;
	
	@RequestMapping("/")
	public String index(HttpServletRequest request){
		request.setAttribute("hello", helloService.getHello());
		return "index";
	}
	
	@RequestMapping("/hello")
	public String hello(HttpServletRequest request){
		request.setAttribute("hello", helloService.getHello());
		return "index";
	}
	
	
	
	
}
